<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
/**
 * 店铺结算详情表
 */
class CreateSettleDescTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('settle_desc', function (Blueprint $table) {
            $table->increments('id');
	        $table->integer('store_station_id')->comment('店铺岗位id');
	        $table->integer('store_id')->comment('店铺id');
	        $table->string('staff_name')->comment('人员姓名');
	        $table->string('station_name')->comment('岗位名称');
	        $table->double('should_hour')->comment('应满工时');
	        $table->double('actual_hour')->comment('实际工时')->nullable();
	        $table->double('settle_hour')->comment('结算工时')->nullable();
	        $table->double('config_hour')->comment('可配置工时')->nullable();
	        $table->double('transfer_hour')->comment('调动工时')->nullable();
	        $table->decimal('hour_salary')->comment('时薪');
	        $table->double('stop_hour')->comment('中止工时')->nullable();
	        $table->double('nonstandard_hour')->comment('非标工时')->nullable();
	        $table->integer('status')->comment('结算状态')->nullable()->default(1);
	        $table->decimal('standard_money')->comment('标准结算金额')->nullable();
	        $table->decimal('reward')->comment('奖金额度')->nullable();
	        $table->decimal('actual_money')->comment('实发金额')->nullable();
	        $table->integer('settle_id')->comment('结算id')->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('settle_desc');
    }
}
